<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<div class="pager">
	<ul>
		<c:if test="${pageInfo.hasPreviousPage}">
			<li><a
				href="${pageContext.request.contextPath }/manage/mediamanage.action?option=getUsers&pageNum=1&pageItemsCount=${page.pages}">首页</a></li>
			<li><a
				href="${pageContext.request.contextPath }/manage/mediamanage.action?option=getUsers&pageNum=${page.prePage}&pageItemsCount=${page.pages}">上一页</a></li>
		</c:if>
		<c:forEach begin="1" end="${pageInfo.pages}" var="each">
			<c:choose>
				<c:when test="${each == pageInfo.pageNum}">
					<li class="active"><a style="color: black;">${each}</a></li>
				</c:when>
				<c:when test="${each >= (pageInfo.pageNum - 2) && each <= (pageInfo.pageNum + 2)}">
					<li><a href="${pageContext.request.contextPath }/manage/mediamanage.action?option=getUsers&pageNum=${each}&pageItemsCount=${pageInfo.pages}">${each}</a></li>
				</c:when>
			</c:choose>
		</c:forEach>
		<c:if test="${pageInfo.hasNextPage}">
			<li><a
				href="${pageContext.request.contextPath }/manage/mediamanage.action?option=getUsers&pageNum=${pageInfo.nextPage}&pageItemsCount=${pageInfo.pages}">下一页</a></li>
			<li><a
				href="${pageContext.request.contextPath }/manage/mediamanage.action?option=getUsers&pageNum=1&pageItemsCount=${pageInfo.pages}">尾页</a></li>
		</c:if>
	</ul>
</div>